/**
 * Created by Administrator on 2017/9/6.
 */
!function (e) {
    function main(index) {
        if (n[index]) return n[index].exports;
        var o = n[index] = {
            i: index,
            l: !1,
            exports: {}
        };
        return e[index].call(o.exports, o, o.exports, main), o.l = !0, o.exports
    }

    var n = {};
    main.m = e;
    main.c = n;
    main.i = function (e) {
        return e
    };
    main.p = "";
    return main(main.s = 101);
}({
    0: function (subFunction, exports, main) {
        "use strict";
        Object.defineProperty(exports, "__esModule", {value: !0});

        /***************
         **常用的基本事件**
         ***************/
        exports.default = {
            isFunction: function (e) {
                return "function" === typeof e;
            }, isArray: function (e) {
                return e instanceof Array;
            }, isPlainObject: function (e) {
                return "[object Object]" === Object.prototype.toString().call(e);
            }, isIE: function () {
                return !!(window.ActiveXObject || "ActiveXObject" in window)
            }, registerEvent: function (target, eventType, eventHandler) {
                target.addEventListener ? target.addEventListener(eventType, eventHandler) : target.attachEvent ? target.attachEvent("on" + eventType, eventHandler, false) : target["on" + eventType] = eventHandler;
            }, removeEvent: function (target, eventType, eventHandler) {
                target.removeEventListener ? target.removeEventListener(target, eventType, eventHandler) : target.detachEvent ? target.detachEvent("on" + eventType, eventHandler, false) : target["on" + eventType] = undefined;
            }, registerMapEvent: function (target, type, handler) {
                return dojo.connect(target, type, handler);
            }, registerLayerEvent: function () {

            }
        };
    }, 1: function (subFunction, exports, main) {
        "use strict";
        Object.defineProperty(exports, "__esModule", {value: !0});
        /***************
         **地图控件的事件**
         ***************/
        exports.default = [
            {
                key: "consoleXY", eventType: "onMouseMove", value: function (e) {
                document.getElementById("longLabel").innerHTML = Degree(new ConsoleXY, e.mapPoint.getLongitude(), 'lon');
                document.getElementById("latLabel").innerHTML = Degree(new ConsoleXY, e.mapPoint.getLatitude(), 'lat')
            }
            }, {
                key: "hideZoomButton", eventType: "onLoad", value: function () {
                    document.getElementById("mapInner_zoom_slider").remove();
                }
            }
        ];
    }, 2: function (subFunction, exports, main) {
        "use strict";
        Object.defineProperty(exports, "__esModule", {value: !0});
        /***************
         **地图元素的事件**
         ***************/

        exports.graphic = {};
    }, 3: function (subFunction, exports, main) {
        "use strict";
        Object.defineProperty(exports, "__esModule", {value: !0});

        exports.default = [
            {id: "map_container", className: "map_container", ele: "div", parentNode: ""},
            {id: "map_root", className: "", ele: "div", parentNode: "map_container"},
            {id: "mapInner", className: "mapInner", ele: "div", parentNode: "map_root"},
            {id: "overlay", className: "map-overlay", ele: "div", parentNode: "map_root"},
            {id: 'overlay-sb', className: 'overlay-sb', ele: 'div', parentNode: "overlay"},
            {id: 'overlay-lonlat', className: 'overlay-lonlat', ele: 'div', parentNode: "overlay"},
            {id: 'longLabel', className: 'lonlat-label', ele: 'span', parentNode: "overlay-lonlat"},
            {id: 'latLabel', className: 'lonlat-label', ele: 'span', parentNode: "overlay-lonlat"}
        ]
    }, 4: function (subFunction, exports, main) {
        "use strict";
        Object.defineProperty(exports, "__esModule", {value: !0});


    }, 101: function (subFunction, exports, main) {
        "use strict";
        Object.defineProperty(exports, "__esModule", {value: !0});

        function check(a) {
            return a && a.default ? a.default : a;
        }

        var n = main(0), nEvents = check(n);
        var m = main(1), mEvents = check(m);
        var gEvent = main(2);
        main(102);//创建地图div元素

        require([
            "esri/map",
            "dojo/parser",
            "esri/dijit/Scalebar",
            "esri/SpatialReference",
            "esri/layers/ArcGISTiledMapServiceLayer",
            "esri/layers/GraphicsLayer", "dojo/domReady!"], function (Map, parser, Scalebar, SpatialReference, ArcGISTiledMapServiceLayer, GraphicsLayer) {
            var map = new Map("mapInner", {
                center: [118.631557, 33.319631],
                // extent: new Extent(117, 32, 119, 35, new SpatialReference({wkid: 4326})),
                zoom: 13,
                fadeOnZoom: true,
                logo: false
            });

            var tiledMap = new ArcGISTiledMapServiceLayer("http://localhost:6080/arcgis/rest/services/HZ_satellite/MapServer", {
                id: "street"
            });
            map.addLayer(tiledMap);

            for (var i = 0, l = mEvents.length; i < l; i++) {
                nEvents.registerMapEvent(map, mEvents[i].eventType, mEvents[i].value)
            }
        })
    }, 102: function (subFunction, exports, main) {
        "use strict";
        Object.defineProperty(exports, "__esModule", {value: !0});

        function check(a) {
            return a && a.default ? a.default : a;
        }

        var map = main(3);
        var mapElement = check(map), map_container = mapElement[0],
            container = document.createElement(map_container.ele);
        container.id = map_container.id, container.className = map_container.className, document.body.appendChild(container);
        for (var i = 1, l = mapElement.length; i < l; i++) {
            if (document.getElementById(mapElement[i].parentNode) === null) continue;
            var element = document.createElement(mapElement[i].ele);
            element.id = mapElement[i].id ? mapElement[i].id : "", element.className = mapElement[i].className ? mapElement[i].className : "";
            document.getElementById(mapElement[i].parentNode).appendChild(element);
        }
    }, 103: function (subFunction, exports, main) {
        "use strict";
    }
});
